home *** CD-ROM | disk | FTP | other *** search
INI File | 2009-09-10 | 837 b | 39 lines |
- [MultiHighlight]
- Syntax=Haskell
- File=Haskell.syx
-
- [Comment]
- 1=<b>Syntax:Haskell</b>
- 2=<b>Author:Marisano James</b>
- 3=<b>Version:0.999</b>
- 4=<b>Date:2009-09-09</b>
- 5=
- 6=<b>Recommended colors:See the Haskell.ssx file</b>
- 7=
- 8=
-
- [Sample]
- 1=maximum' :: (Ord a) => [a] -> a
- 2=maximum' [] = error "maximum of empty list"
- 3=maximum' [x] = x
- 4=maximum' (x:xs)
- 5=| x > maxTail = x
- 6=| otherwise = maxTail
- 7=where maxTail = maximum' xs
- 8=
- 9=
- 10=maximum'' :: (Ord a) => [a] -> a
- 11=maximum'' [] = error "maximum of an error list"
- 12=maximum'' [x] = x
- 13=maximum'' (x:xs) = max x (maximum xs)
- 14=-- This is a comment
- 15=
- 16=initials :: String -> String -> String
- 17=initials firstname lastname = [f] ++ ". " ++ [l] ++ "."
- 18=where (f:_) = firstname
- 19=(l:_) = lastname
- 20=
- 21={- I am a
- 22=multiline comment -}
-
-